PhotoGIF™ Text Docs 2. Copyright 1996 BoxTop Software, Inc. All rights Reserved.
BoxTop Software, Inc.
One Research Boulevard
Suite 201
Starkville, MS 39759
voice 601/323-6436
fax 601/324-7352
http://www.boxtopsoft.com
ftp://ftp.boxtopsoft.com/pub/
info@boxtopsoft.com
(Continued from "PhotoGIF™ Text Docs 1")
Opening Files with PhotoGIF™
Opening files with PhotoGIF™ takes no special action from the finder. Simply double-click on or drag a GIF file onto Photoshop, and PhotoGIF™ will be used as the default method for opening all GIF files. There is no user control over this behavior, and there are no variants of GIF files that PhotoGIF™ cannot open.
PhotoGIF™ automatically determines if a GIF file contains one or multiple images. If the file is a single image GIF file, no additional user input is required, and the file is opened directly into Photoshop without any dialogs being presented. However, if PhotoGIF™ determines that the file being opened contains multiple images, additional input is required before the file can be opened, and the multiple image open options dialog is presented.
The multiple image open options dialog allows you to specify the mode in which you would like to edit the multiple image file. There are four editing modes available, each having its specific advantages for working with multiple image GIF animation files.
The first mode ‘Edit single image...’ allows you to directly edit one image within a multiple image GIF animation file while maintaining the integrity of the multiple image structure of the original file. If you select ‘Edit single image...’ as the editing mode, an additional dialog, the open image picker, will be displayed after the multiple image open options dialog so you can select which image from the multiple image GIF animation file to open.
The second mode ‘Edit cell-strip’ is most useful for viewing all the images within a multiple image GIF animation file at the same time. It is not suitable for editing animations, unless all the images within the animation are the same size as the logical screen size of the multiple image GIF animation file. If any of the images within the multiple image GIF animation file are smaller than the logical screen size of the multiple image GIF animation file, reserving the file from ‘Edit cell strip’ mode will increase the size of the file, because the images smaller than the logical screen size will be increased in size by filling the area between the image size and the logical screen size with the GIF background color. You can view either vertically or horizontally in ‘Edit cell-strip’ mode.
The third mode ‘Extract single image...’ allows you to extract a copy of a single image contained within a multiple image GIF animation file to edit. The original file will be left unaltered and a new single image GIF file will be created and opened into Photoshop for editing. The new file created is automatically named with the original file name and the sequential number of the image being extracted. If a file already exists with this name, PhotoGIF™ will return an error. If you select ‘Extract single image...’ as the editing mode, an additional dialog, the open image picker, will be displayed after the multiple image open options dialog so you can select which image from the multiple image GIF animation file to extract.
The fourth and last editing mode, ‘Extract all images’ operates in much the same way as ‘Extract single image...’ except that all images are extracted into new single image GIF files and then opened into Photoshop for editing. The new files created are automatically named with the original file name and the sequential number of the image contained in each new file. If a file already exists with the same name as PhotoGIF™ tries to assign to a new file, PhotoGIF™ will return an error and will not extract the corresponding image from the multiple image GIF animation file. The original multiple image GIF animation file is not altered.
Saving Files with PhotoGIF™
There are two means of saving files using PhotoGIF™. The first is using the ‘Save as...’ command in Photoshop and the second is ‘Save’ or Command - S. You should be very familiar with save and save as from within Photoshop and using PhotoGIF™ works in much the same way as saving in other formats from Photoshop, except in some cases when performing a ‘Save’ requires user input not present with other formats.
If you perform a ‘Save as...’, you first see Photoshop’s put file dialog where you select the format to use and supply the name for the new file. Once you hit the ‘Save’ button in that dialog, PhotoGIF™ will show the required options dialog for the saving process. Which dialog shown immediately after Photoshop’s put file dialog depends on the image mode of the working image within Photoshop.
PhotoGIF™ supports saving from bit-mapped, greyscale, indexed and RGB image modes. When performing a ‘Save as...’ from bit-mapped, greyscale, or indexed image mode, the first dialog presented by PhotoGIF™ is the single image options dialog. However, if performing a ‘Save as...’ from RGB mode, the working image must first be color-reduced, because the GIF format supports a maximum of 256 colors per image, and the first dialog presented will be the color reduction options dialog.
In the color reduction options dialog you specify whether to use a custom palette optimized for the individual image or an existing fixed palette when color-reducing the image. You can also load any palette from any existing GIF file or Photoshop CLUT file by using the ‘Load’ button in the color reduction options dialog.
You need to specify the resolution or number of colors desired in the color reduction options dialog. When using a custom palette, most images can be represented very effectively using a low number of colors, 32 or 64 will accommodate most images using the custom palette color reduction in PhotoGIF™. However, color reduction is more difficult when using an existing fixed palette because the palette may not be well suited to the image. The fixed palette color reduction in PhotoGIF™ is more advanced than that found in other applications and will generally do a much better job of color reduction using an existing palette, but the results will still vary greatly depending on the palette and how suited it is to the image.
You also need to set controls for dithering. There is a check box to turn dithering on/off and a slider control to set the level of dithering. Higher values for dithering with the fixed palette color reduction can improve visual quality, but will adversely affect file size. Dithering should be set to the lowest acceptable value for image quality to achieve the smallest GIF file size, and the amount of dithering necessary will vary with the image being color-reduced.
The single image options dialog will be displayed immediately after Photoshop’s put file dialog if you are saving from bit-mapped, grayscale, or indexed image modes in Photoshop, or immediately after the color reduction options dialog previously displayed, if saving from RGB image mode in Photoshop.
The single image options dialog is the primary dialog for PhotoGIF™, and the last dialog required if saving a single image GIF file. In the single image options dialog, you set GIF image parameters for transparency, as well as interlacing, have control over palette usage optimization, and whether you require the dialogs for creating and editing multiple image GIF animation files.
Setting transparency is the primary function of the single image options dialog. There are three tools that allow you to get flawless transparency for your GIF images, and PhotoGIF™ can also use any saved alpha channel to designate transparency in the image.
To use an alpha channel to set transparency, you will need to select the portion of the image that you DO NOT want to be transparent, and save that selection to an alpha channel before using PhotoGIF™ to save the file. Using an alpha channel provides the most accuracy and control for setting transparency and is also the simplest way to set transparency if the portion of the image you want to make transparent contains many different colors. Once in the single image options dialog to set transparency using a saved alpha channel, select ‘Alpha’ as the transparency method and pick the alpha channel you saved for transparency with the popup menu that appears when you select the ‘Alpha’ transparency method. You will see how your image will look with transparency set with the saved alpha channel in the preview.
To set transparency based on a color, first select ‘Color’ as the transparency method, then use the dropper tool to select the transparent color from either the preview or the palette. The preview will always show exactly how your image will display as a transparent GIF, but it is important that you use the RGB sliders for browser background color to set the actual color you intend to use on your web page for the preview. Visual halo effects around the edges of your transparency are directly related to the browser background color and if a different browser background color is used to preview the image than the actual color used on the web page the image will appear on then there is no guarantee that the edges of your transparency will appear clean and free from unwanted halo effects.
To remove halo effects from the edge of your transparency, use the edge tool. Exact precision in not necessary when using the edge tool. Simply trace the outline of your image with the edge tool and halo effects will be automatically removed. Note that the operation of the edge tool is dependent on the correct browser background color being set in the single image options dialog.
If you do not want to save a transparent GIF, check ‘None’ for the transparency method.
After setting transparency, you should set interlacing for the image. Large single image GIF files should generally be interlaced since interlacing lets viewers see the image faster as it downloads. Very small single image GIF files and images within multiple image GIF animation files should generally not be interlaced.
From the single image options dialog, you can also select the ‘Optimize palette usage’ option. This option will remove redundant colors from the image being saved and significantly improve file size. It is a lossy option and can result in possibly loss of image quality if used on images with large, smooth gradients. On most images no unacceptable loss of image quality will occur, but it should be used with caution.
If you are saving a single image GIF file, make sure that the ‘Show multi-image options dialog’ and ‘Add to existing GIF file’ checkboxes are NOT checked. If PhotoGIF™ goes through the multi-image options dialog, it will add the Netscape looping extension block to the saved GIF image. In certain versions of Netscape this will cause your single image to continuously reload and redraw.
Saving Multiple Image GIF animation Files with PhotoGIF™
PhotoGIF™ creates multiple image GIF animation files by appending the contents of an existing single or multiple image GIF file together with the image being saved.
There are three dialogs that control saving multiple image GIF animation files. The multiple image options dialog allows setting GIF animation parameters for looping, delay time, logical screen size, position and disposal method; while, the appending get file dialog and the appending insertion picker dialog work together to allow you to combine images together into multiple image GIF animation files.
These dialogs are optionally shown, depending on whether ‘Show multi-image options’ or ‘Append to existing GIF file’ are checked in the single image options dialog.
To create a multiple image GIF animation file, begin with a single image that will be the first image in your animation and save it with PhotoGIF™. Make sure to check the ‘Show multi-image options dialog’ check box from the single image options dialog, but not the check box for ‘Append to existing GIF file’.
In the multiple image options dialog, set the initial global parameters for looping, logical screen size, and background color. These can be changed at any time while building the multiple image GIF animation file. Also set the local parameters for delay time on the image being saved, the position of the image relative to the logical screen size and the disposal method.
The file will be saved with all the required information for a multiple image GIF animation file, but you will need to add more images to create a multiple image GIF animation file. To do this close the image just saved and open the next image you want to use in your animation. Follow the same steps when saving it but in addition to checking ‘Show multiple image options dialog’ from the single image options dialog, also check ‘Append to existing GIF file’.
After the single image options dialog, the appending get file dialog will be presented. Select the image you saved previously for the first image in your animation by double clicking it in the file list. The appending insertion picker dialog will then be presented. You can chose to insert the second image before or after the first image you saved. If you there is more than one image in the file you are combining to the file being saved, you can also choose to insert the new image after any image in the existing multiple image GIF animation file.
After you have selected the insertion point for the current image being saved, the multiple image options dialog will be shown so you can set the local parameters for the image being added to the multiple image GIF animation file and change global parameters, if necessary.
The image being saved becomes a multiple image GIF file containing more images and the file selected in the appending get file dialog remains unmodified. The last file saved will be your completed multiple image GIF animation file, and all other files will remain as intermediate steps in creating your animation.
NOTE: There are limitations to PhotoGIF™’s editing ability with multiple image GIF animation files. Although, it is easy to add images to your animations, there is no good way to change the ordering of the images within a multiple image GIF animation file or remove an image from a multiple image GIF animation file with PhotoGIF™ at present. The cell strip editing mode does provide a primitive way to change the ordering of images and to remove an image but it requires careful selecting of the image area and also careful changing of the working document’s canvas size, while editing the multiple image GIF animation file in cell-strip mode.
PhotoGIF™ is the only tool that provides direct editing capability for images within GIF animations and also the only easy way to separate images from multiple image GIF files into single images again but, GIFmation™, another BoxTop Software, Inc. tool, is a video editor for GIF animations that provides more advanced capabilities for editing GIF animations and preview capability that is not present in PhotoGIF™.
Optimizing GIF images for the web with PhotoGIF™
GIF files use a lossless compression method called LZW that is an efficient general purpose compression algorithm. Image data is encoded a scan line at a time and LZW compression efficiency is closely related to the amount of linear change in the scan lines of the image being compressed.
Dithering, a common technique to improve the quality of indexed color images, adds entropy, or change, that makes the LZW compression used by GIF less efficient. Dithered images will generally compress as well as non-dithered images. The custom palette color reduction in PhotoGIF™ does not use traditional dithering techniques, it uses a variable intensity selective dithering method that minimizes the entropy added to the image by dithering and thus improves compressibility as much as possible while still ensuring satisfactory visual quality.
Aside from dithering and the entropy it causes that adversely affects the compressibility of image data, the biggest factor effecting image size is resolution, or bit-depth of the image. The lower the bit-depth and fewer number of colors used in an image, the smaller it will compress as a GIF file. PhotoGIF™ has superior custom and fixed palette color reduction that allows you to achieve acceptable visual results, while using fewer colors in images. This capability will allow you to create smaller GIF files that download and display faster.
In addition PhotoGIF™ has optimization features that automatically find and remove redundant colors in the palette from the image being saved. This can result in unwanted quality loss for images with smooth gradients but for most images the effects are not visually apparent, while the effects on file size are significant.
Beyond the capability built into PhotoGIF™, GIF images can be optimized by hand to improve their compressibility. This is not a fast process but it is an easy one that can make a very large difference in file size at times. By manually removing areas of horizontal change in the scan lines of an image to be saved as GIF files, you can make a very noticeable difference in file size with no question of image quality.
PhotoGIF™ 2.1.1 is Copyright 1996 BoxTop Software, Inc. All rights reserved. PhotoGIF™ is a Trade Mark of BoxTop Software, Inc.